<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>
        重庆时时彩
    </title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="__STATIC__/admin/css/x-admin.css" media="all">
    <link rel="stylesheet" href="__STATIC__/layui/css/layui.css"  media="all">
</head>
<body>
<div class="x-nav">
            <span class="layui-breadcrumb">
              <a><cite>首页</cite></a>
              <a><cite>开奖数据</cite></a>
              <a><cite>重庆时时彩</cite></a>
            </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon"
                                                                        style="line-height:30px">ဂ</i></a>
</div>


<div class="x-body">
    <form class="layui-form x-center" action="" >
        <div class="layui-form-pane" style="margin-top: 15px;">
            <div class="layui-form-item">
                <div class="layui-input-inline" style="width:80px">
                    <a class="layui-btn" href="{:url('data/cqssc')}">今天</a>
                </div>
                <label class="layui-form-label">日期选择</label>
                <div class="layui-input-inline">
                    <input class="layui-input" placeholder="选择日期" name="date" id="start" value="{$Think.get.start}">
                </div>
                <div class="layui-input-inline" style="width:80px">
                    <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
                </div>

            </div>
        </div>
    </form>

    <table lay-filter="tab" lay-size="sm" >
        <thead>
        <tr>
            <th lay-data="{field:'id',sort:true,width:110}">彩种</th>
            <th lay-data="{field:'a',sort:true,width:120}">期数</th>
            <th lay-data="{field:'c',sort:true,width:150}">开奖时间</th>
            <th lay-data="{field:'w',sort:true,width:70}">状态</th>
            <th lay-data="{field:'z',sort:true}">开奖结果</th>
            <th lay-data="{field:'y',sort:true}">手动开奖</th>
            <th lay-data="{field:'h',sort:true,width:110}">方案总数</th>
            <th lay-data="{field:'q',sort:true,width:110}">参与人数</th>
            <th lay-data="{field:'e',sort:true,width:110}">投注金额</th>
            <th lay-data="{field:'b',sort:true,width:110}">中奖金额</th>
            <th lay-data="{field:'l',sort:true,width:110}">返点金额</th>
            <th lay-data="{field:'k',sort:true,width:90}">操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="data" id="vo"}
            <tr>
                <td>重庆时时彩</td>
                <td>{$vo.expect}</td>
                <td>{$vo.opentime}</td>
                <td>
                    {if condition="$vo.state eq 1"}
                        <span style="color: #ff0000">已开奖</span>
                    {else/}
                        未开奖
                    {/if}
                </td>
                <td>{$vo.opencode}</td>
                <td>{$vo.handcode}</td>
                <td>{$vo.handcode}</td>
                <td>{$vo.handcode}</td>
                <td>{$vo.handcode}</td>
                <td>{$vo.handcode}</td>
                <td>{$vo.handcode}</td>
                <td><a href="javascript:;" onclick="hand_code('{$vo.expect}')" style="color: #079dc6">手动开奖</a></td>

            </tr>
        {/volist}
        </tbody>
    </table>

</div>

<script src="__STATIC__/admin/lib/layui/layui.js" charset="utf-8"></script>
<script src="__STATIC__/admin/js/x-layui.js" charset="utf-8"></script>
<script src="__STATIC__/layui/layui.js" charset="utf-8"></script>
<script>
    layui.use(['laydate', 'element', 'laypage', 'layer','table'], function () {
        $ = layui.jquery;//jquery
        layer = layui.layer;//弹出层
        laydate = layui.laydate;//日期插件
        table = layui.table;

        //转换静态表格
        table.init('tab', {
            limit: 120 //注意：请务必确保 limit 参数（默认：10）是与你服务端限定的数据条数一致
            //支持所有基础参数
        });

        laydate.render({
            elem: '#start' //指定元素
            ,min: '2000-1-1'
            ,max: '2018-12-31'
        });
        laydate.render({
            elem: '#end' //指定元素
        });

    });

    /*手动开奖*/
    function hand_code(id) {
        var url = "{:url('data/handcode')}?id="+id;
        x_admin_show('手动开奖', url,500,350);
    }

    /*停用*/
    function admin_stop(id,state) {
        if(state == 1){
            layer.confirm('确认要停用吗？', function (index) {
                //发异步把用户状态进行更改
                location.href = "{:url('admin/adminStop')}?id="+id+'&state='+state;
            });
        }else if(state == 0){
            layer.confirm('确认要开启吗？', function (index) {
                //发异步把用户状态进行更改
                location.href = "{:url('admin/adminStop')}?id="+id+'&state='+state;
            });

        }
    }


    //编辑
    function user_edit(id) {
        var title = '编辑';
        var url = "{:url('User/userEdit')}?id="+id;
        x_admin_show(title, url,500);
    }

    /*删除*/
    function admin_del(obj, id) {
        layer.confirm('确认要删除吗？', function (index) {
            //发异步删除数据
            $(obj).parents("tr").remove();
            layer.msg('已删除!', {icon: 1, time: 1000});
        });
    }
</script>
<script>
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
</body>
</html>